package cn.fighter3.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

@TableName(value = "iplog")
public class Iplog{
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String ip;
    private String username;
    private String state ;
    private String logintime;
//    public static final int STATE_SUCCESS = 0;//登录成功
//    public static final int STATE_FAIL = 1;//登录失败


//    public String getStateDisplay() {
//        //用来页面显示,如果直接显示0或者1,不是很直观
//        return state == STATE_SUCCESS ? "登录成功" : "登录失败";
//    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public void setUsername(String username) {
        this.username = username;
    }



    public Integer getId() {
        return id;
    }

    public String getIp() {
        return ip;
    }

    public String getUsername() {
        return username;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getLogintime() {
        return logintime;
    }

    public void setLogintime(String logintime) {
        this.logintime = logintime;
    }

    public Iplog(){

    }

    public Iplog(String ip, String username, String state, String logintime) {
        this.ip = ip;
        this.username = username;
        this.state = state;
        this.logintime = logintime;
    }
}
